<?php
$jaka_ankieta = $_POST["jaka_ankieta"];
$query = mysql_query("SELECT * FROM ankiety WHERE id = '$jaka_ankieta'");

while ($rekord = mysql_fetch_assoc($query))
{
$tytul = $rekord['tytul'];

$answer1 = $rekord['answer1'];
$answer2 = $rekord['answer2'];
$answer3 = $rekord['answer3'];

$answer4 = $rekord['answer4'];
$answer5 = $rekord['answer5'];
$answer6 = $rekord['answer6'];
}


echo '<br />';
echo '<p>Liczba głosów w ankiecie: '.$tytul.'</p>';
echo '<br />';
echo '<p>'.$answer1.': '.$answer4.'</p>';
echo '<br />';
echo '<p>'.$answer2.': '.$answer5.'</p>';
echo '<br />';
echo '<p>'.$answer3.': '.$answer6.'</p>';
echo '<br />';
?>
